/**
 * Generate time : 2011-05-12 5:30:16
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cs.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCSSystemSettingCD 生产文档设置
 * 
 */
public class ZMCSSystemSettingCD extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdEditLimits = " "; /* 编辑权限 */
	private String fdBrowseLimits = " "; /* 浏览权限 */
	private String fdCatalogLimits = " "; /* 目录操作权限 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEditLimits");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("编辑权限");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBrowseLimits");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("浏览权限");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCatalogLimits");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("目录操作权限");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCSSystemSettingCD() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdEditLimits - 编辑权限
	 * 
	 * @return the fdEditLimits
	 */
	public String getFdEditLimits() {
		return this.fdEditLimits;
	}

	/**
	 * set the fdEditLimits - 编辑权限
	 */
	public void setFdEditLimits(String fdEditLimits) {
		this.fdEditLimits = fdEditLimits;
	}

	/**
	 * get the fdBrowseLimits - 浏览权限
	 * 
	 * @return the fdBrowseLimits
	 */
	public String getFdBrowseLimits() {
		return this.fdBrowseLimits;
	}

	/**
	 * set the fdBrowseLimits - 浏览权限
	 */
	public void setFdBrowseLimits(String fdBrowseLimits) {
		this.fdBrowseLimits = fdBrowseLimits;
	}

	/**
	 * get the fdCatalogLimits - 目录操作权限
	 * 
	 * @return the fdCatalogLimits
	 */
	public String getFdCatalogLimits() {
		return this.fdCatalogLimits;
	}

	/**
	 * set the fdCatalogLimits - 目录操作权限
	 */
	public void setFdCatalogLimits(String fdCatalogLimits) {
		this.fdCatalogLimits = fdCatalogLimits;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdEditLimits(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEditLimits")), fdEditLimits));
		setFdBrowseLimits(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBrowseLimits")), fdBrowseLimits));
		setFdCatalogLimits(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCatalogLimits")), fdCatalogLimits));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdEditLimits", StringUtils.toString(fdEditLimits, eiMetadata.getMeta("fdEditLimits")));
		map.put("fdBrowseLimits", StringUtils.toString(fdBrowseLimits, eiMetadata.getMeta("fdBrowseLimits")));
		map.put("fdCatalogLimits", StringUtils.toString(fdCatalogLimits, eiMetadata.getMeta("fdCatalogLimits")));

		return map;

	}
}